<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    
<title>Mushpup User Interface Unit Tests</title>

<!-- Stylesheets -->
<!-- Google AJAX Apis -->
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.0");
</script>

<!-- jQuery Unit Tests -->
<script type="text/javascript" src="http://github.com/jquery/qunit/raw/master/qunit/qunit.js"></script>
<link rel="stylesheet" href="http://github.com/jquery/qunit/raw/master/qunit/qunit.css" type="text/css" media="screen" />

<!-- Other Scripts -->
<script src="../js/external/paj/sha1.js"></script>
<script src="../js/external/parseUri.js"></script>
<script src="../js/external/jquery_plugins/jquery.corners.js"></script>
<script src="../js/external/jquery_plugins/jquery.corner.js"></script>
<script src="../js/mushpup/mushpup.js"></script>
   

<!-- Unit Tests -->
<script type="text/javascript">
$(document).ready(function(){
    
    var Mushpup = new MushpupBase();
    var MushpupUi = new MushpupUI();
    
    module('Mushpup UI (version ' + MushpupUi.version + ')');
    test('load test', function() {
        equals( MushpupUi.load_test(), MushpupUi.version, 'simple UI test' );
    });
    
    module('Mushpup UI Global Assembler');
    test('render basic', function() {
        $MushpupEl = MushpupUi.render(Mushpup);
        ok( $MushpupEl instanceof jQuery, 'return jQuery object' );
        equals( $MushpupEl.attr('id'), MushpupUi.ui_id );
    });
    
    module('Banner Test');
    test('banner demos', function() {
        var BannerCss = {
            'margin':'8px', 'padding':'16px',
            'background-color':'#CDE', 'border':'1px solid #69C',
            'color':'#369', 'font-size':'24px'
        };
        $TestBanner1 = $('<div>').attr('id', 'test_banner1').text(
            'test banner using jquery.corners.js').css(BannerCss);
        $TestBanner2 = $('<div>').attr('id', 'test_banner2').text(
            'test banner using jquery.corner.js').css(BannerCss);
        $('#qunit-userAgent').after($TestBanner1).after($TestBanner2);
        
        $TestBanner1.corners('10px top');
        $TestBanner2.corner("tl bl 20px").corner("tr 40px");
    });
    test('mushpup banner method', function() {
        var $MushpupBanner = MushpupUi.build_banner_panel();
        equals( $($MushpupBanner.find('h1')[0]).text(), 'mushpup 2.0' );
        ok( $($MushpupBanner.find('h4')[0]).hasClass('subbanner') );
    });

});
  </script>
  
</head>
<body>
  
 <h1 id="qunit-header">Mushpup Unit Testing</h1>
 <h2 id="qunit-banner"></h2>
 <h2 id="qunit-userAgent"></h2>
 <ol id="qunit-tests"></ol>
 
 <div id="hidden_div" style="display:none;">
    you can use this for tests without disrupting display
 </div>
 
</body>
</html>
